package model

import "time"

type Users struct {
	Id          int       `json:"id" gorm:"type:bigint(20) unsigned; NOT NULL; AUTO_INCREMENT; primary_key"`
	Name        string    `json:"name" gorm:"type:varchar(191); NOT NULL"`
	Mobile      string    `json:"mobile" gorm:"type:varchar(191); COMMENT:'手机号'"`
	HeadImgUrl  string    `json:"headImgUrl" gorm:"type:varchar(191); COMMENT:'头像'"`
	Unionid     string    `json:"unionid" gorm:"type:varchar(191); COMMENT:'unionid'"`
	Openid      string    `json:"openid" gorm:"type:varchar(191); COMMENT:'openid'"`
	Status      int       `json:"status" gorm:"type:tinyint(4); DEFAULT:0; COMMENT:'用户状态'"`
	Company     string    `json:"company" gorm:"type:varchar(191); COMMENT:'企业'"`
	Token       string    `json:"token" gorm:"type:varchar(191); COMMENT:'token'"`
	YonyouRoles string    `json:"yonyou_roles" gorm:"type:varchar(191); COMMENT:'用户权限'"`
	CreatedAt   time.Time `json:"created_at" gorm:"type:timestamp; DEFAULT:NULL"`
	UpdatedAt   time.Time `json:"updated_at" gorm:"type:timestamp; DEFAULT:NULL"`
}

func (u *Users) TableName() string {
	return "users"
}
